import request from "@/utils/request";
import fileRequest from "@/utils/fileRequest";

/**
 * @description 列表
 * @param params
 * @returns {*}
 */
export function list(params) {
  return request({
    url: '/enjoyEnterprise/getEnjoyEnterpriseList',
    method: 'GET',
    params
  })
}

/**
 * @description 新增/编辑
 * @param data
 * @returns {*}
 */
export function save(data) {
  return request({
    url: '/enjoyEnterprise/addAndUpdateEnjoyEnterprise',
    method: 'POST',
    data
  })
}

/**
 * @description 删除
 * @param id
 * @returns {*}
 */
export function deleteRow(id) {
  return request({
    url: '/enjoyEnterprise/delEnjoyEnterprise',
    method: 'GET',
    params: {id}
  })
}

/**
 * @description 详情
 * @param id
 * @returns {*}
 */
export function detail(id) {
  return request({
    url: '/enjoyEnterprise/getEnjoyEnterpriseById',
    method: 'GET',
    params: {id}
  })
}

export function exportEnterprise(params) {
  return fileRequest({
    url: '/enjoyEnterprise/enjoyEnterpriseExcel',
    method: 'GET',
    params
  })
}

/**
 * 人社局审核
 * @param data
 * @returns {*}
 */
export function humanExamine(data){
  return request({
    url:'/enjoyEnterprise/addAndUpdateEnjoyEnterprise',
    method:'POST',
    data
  })
}

/**
 * 银行审核
 * @param data
 * @returns {*}
 */
export function bankExamine(data){
  return request({
    url:'/enjoyEnterprise/addAndUpdateEnjoyEnterprise',
    method:'POST',
    data
  })
}

/**
 * @description 详情
 * @param id
 * @returns {*}
 */
export function getSelectEnterpriseById(id) {
  return request({
    url: '/enjoyEnterprise/getSelectEnterpriseById',
    method: 'GET',
    params: {id}
  })
}
